<!DOCTYPE html>
<html lang="en" layout:decorate="~{admin/layouts/layout}"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      xmlns:th="http://www.thymeleaf.org">
<head th:replace="admin/commons/header :: common-header(~{}, ~{::link})">
    <link rel="stylesheet" th:href="@{/css/admin/ad_subject.css}">
</head>
<body>
<div layout:fragment="content">
    <!-- 表格列拖动 -->
    <!-- https://blog.csdn.net/qq_40680190/article/details/82415284 -->
    <div class="btn-group" id="toolbar">
        <button class="btn btn-default" th:onclick="$('#infoModal').modal('show')" type="button">
            <span aria-hidden="true" class="glyphicon glyphicon-plus"></span>新增
        </button>
    </div>
    <div class="table-responsive">
        <table class="table table-striped" id="subject_table"></table>
    </div>
    <div aria-hidden="true" aria-labelledby="myModalLabel" class="modal fade" id="infoModal" role="dialog"
         tabindex="-1">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <strong class="modal-title" id="myModalLabel" th:text="专业类别"></strong>
                    <button aria-hidden="true" class="btn close" data-dismiss="modal">&times;</button>
                </div>
                <div class="modal-body">
                    <form class="form-group-lg form-horizontal" role="form" th:id="subject_form">
                        <input id="id" name="id" type="hidden" value="">
                        <div class="form-group">
                            <label class="col-md-3 control-label" for="name" th:text="专业类别名称"></label>
                            <div class="col-md-8">
                                <input class="form-control" id="name" name="name" placeholder="专业类别名称" type="text"
                                       value="">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-3 control-label" for="code">编码</label>
                            <div class="col-md-8">
                                <input class="form-control" id="code" name="code" placeholder="请输入编码" type="text"
                                       value="">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-3 control-label" for="description">专业类别描述</label>
                            <div class="col-md-8">
                                <textarea class="form-control desc_text_area" id="description"
                                          name="description"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-3 control-label" for="iconUri">图标名称</label>
                            <div class="col-md-8">
                                <input class="form-control" id="iconUri" name="iconUri" placeholder="图标名称" type="text"
                                       value="">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-3 control-label" for="orderNumber">排序号</label>
                            <div class="col-md-8">
                                <input class="form-control" id="orderNumber" name="orderNumber" placeholder="排序号" type="number"
                                       value="">
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-default" data-dismiss="modal" th:text="关闭" type="button"></button>
                    <button class="btn btn-primary" th:onclick="saveSubject()" th:text="保存" type="button"></button>
                </div>
            </div>
        </div>
    </div>
    <!-- 额外引入js -->
    <footer>
        <div  th:replace="admin/commons/footer :: footer(~{::script})">
            <script th:src="@{/js/admin/ad_subject.js}"></script>
        </div>
    </footer>
</div>
</body>
</html>
